package com.qk.controller;

import com.qk.common.PageResult;
import com.qk.common.Result;
import com.qk.dto.OperatorLogDto;
import com.qk.entity.OperateLog;
import com.qk.service.OperatorLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/logs")
public class OperatorLogController {
    @Autowired
    private OperatorLogService operatorLogService;
    @GetMapping
    public Result list(OperatorLogDto operatorLogDto)
    {
        log.info( "查询所有操作日志: {}",operatorLogDto);
        PageResult<OperateLog> pageResult = operatorLogService.listOperatorLogs(operatorLogDto);
        return Result.success(pageResult);
    }


}
